'''
Created on 2012-9-25

@author: null
'''
from models import Thing
from dao import BaseDataAccess

class ThingDataAccess(BaseDataAccess):
    def add(self, thing):
        self.db.add(thing);
        self.db.commit();
        return thing.id;
    
    def get_thing_list(self, user_id, limit_count):
        result = self.db.query(Thing).filter(Thing.user_id == user_id).limit(limit_count).all();
        return result;

    
    
